<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="com.isesol.api.rest.cgi.utils.RestServiceUtils" %>
<%@ page import="com.isesol.api.rest.cgi.utils.RestServiceMapping" %>
<%@ page import="java.util.Map" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <meta http-equiv="Cache-Control" content="no-store"/>
    <meta http-equiv="Pragma" content="no-cache"/>
    <meta http-equiv="Expires" content="0"/>
    <style>
        dt {
            margin-top: 0.5em;
        }
    </style>
</head>
<body>
    <h2>REST API 示例项目</h2>
    <h3>${prop['system.env']} - ${prop['system.version']}</h3>
    <hr/>
    <dl>
        <%
            Map<String, RestServiceMapping> serviceMappings = RestServiceUtils.getServiceMappings();
            pageContext.setAttribute("mappings", serviceMappings);
        %>
        <c:forEach items="${mappings}" var="mapping">
            <dt style="color: red">${mapping.key}</dt>
            <dd>${mapping.value}</dd>
        </c:forEach>
    </dl>

</body>
</html>